blob: 945eee30c8fb4d3017f3d61b85ac457cfed34e05 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import { auth, get } from "$lib/utils";
import { redirect } from "@sveltejs/kit";
export let load = async ({ cookies, params }) => {
let { serial } = params;
let fund;
try {
fund = await get(`/fund/${serial}`, auth(cookies));
} catch (e) {
console.log(e);
}
if (fund) redirect(307, `/fund/${serial}`);
return params;
};
|